Add supported stack sort controls to the Svelte UI#2278
Conversation
|
|
Co-authored-by: niemyjski <1020579+niemyjski@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b6d3929e96
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| renderComponent(StackSortHeader, { | ||
| active: mode === 'stack_new', | ||
| label: 'First', | ||
| onclick: () => options?.onStackSort?.('stack_new') |
There was a problem hiding this comment.
Keep First sort from filtering stacks
When users click the First header with any time range, this sends mode=stack_new; the server does not only sort by first occurrence for that mode, it also adds a first_occurrence:[range] filter in EventController.GetInternalAsync via AddFirstOccurrenceFilter, so stacks whose first occurrence predates the current range disappear even if they have matching recent events. A column header presented as sorting the current stack list should not change the result set/count; either avoid exposing this as a sort or use an API mode that preserves all matching stacks.
Useful? React with 👍 / 👎.
What changed
Why
The original implementation exposed generic TanStack sorting, which caused stack requests to return HTTP 400 and attempted to sort session duration by a field the API does not provide. This keeps the feature Svelte-only while using the backend contract that already exists.
Verification
Runtime QA
Local AppHost startup was attempted with workspace-isolated Aspire state, but timed out after 120 seconds at Determining projects to restore. Other running Exceptionless worktrees were left untouched, so browser dogfood was not claimed against a different checkout.
Breaking changes
None.